from typing import List


def func1(nums: List[int]) -> int:
    t = set()
    for i in nums:
        if i not in t:
            t.add(i)
        else:
            return i


def func2(nums: List[int]) -> int:

